﻿@model IEnumerable<FamilyJobsUI.Models.UsersEditModel>

@{
    ViewBag.Title = "Index";
}

@*<h2>Index</h2>*@

<p>
@if (User.Identity.IsAuthenticated) {
    @Html.ActionLink("Create New", "Create")
}
</p>
<table class="table">
    <tr>
        <th>
        </th>
        <th>
            @Html.DisplayNameFor(model => model.user_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.user_Admin)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.user_Email)
        </th>
        @*<th>
            @Html.DisplayNameFor(model => model.user_Birthday)
        </th>*@
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.Gravatar(item.user_Email, 80, new { Title = "My Gravatar", Alt = "Gravatar" })
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.user_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.user_Admin)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.user_Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.user_Birthday)
        </td>
        <td>
            @if (User.Identity.IsAuthenticated) {
                <text>
                @Html.ActionLink("Edit", "Edit", new { id=item.user_ID }) |
                @Html.ActionLink("Details", "Details", new { id=item.user_ID }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.user_ID })
                </text>
            }
        </td>
    </tr>
}

</table>
